package jdbc;

import com.climb.moive.entity.Member;
import com.climb.moive.framework.jdbc.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class CustomPropertyRowMapper implements RowMapper<Member> {
    @Override
    public Member mapRow(ResultSet rs, int rowNum) throws SQLException {
        Member member = new Member();
        member.setId(rs.getInt("id"));
        member.setAccount(rs.getString("account"));
        member.setPassword(rs.getString("password"));
        member.setName(rs.getString("name"));
        member.setEmail(rs.getString("email"));
        member.setPhone(rs.getString("phone"));
        member.setRegister_time(rs.getDate("register_time"));

        return member;
    }
}
